package com.ruicar.afs.cloud.channel.mange.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Set;

/**
 * @Author Ice
 */
@Data
public class UserRegion {
    @ApiModelProperty(value = "唯一标识")
    @JsonSerialize(using= ToStringSerializer.class)
    @JSONField(serializeUsing = com.alibaba.fastjson.serializer.ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 上级区域id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 层级
     */
    private Integer level;
    /**
     * 是否是父节点 枚举值：是、否
     */
    private String isParent;
    /**
     * 状态 枚举值：是、否
     */
    private String status;
    /**
     * 子节点，页面回显展示用
     */
    @TableField(exist = false)
    private List<ChannelAppertainRegion> children;

    /**
     * 默认选中
     */
    @TableField(exist = false)
    private Boolean selected;

    /**
     * 用户id
     */
    private String UserId;
    /**
     * 用户名字
     */
    private String title;

    private Set<Long> lowerUserIds;
}
